
<?php
function RandomCode($max){
//Huruf dan angka yang akan di acak
$char = array("slideb1.JPG","slideb2.JPG","slideb3.JPG");
$keys = array();
while(count($keys) < $max) {
    $x = mt_rand(0, count($char)-1);
    if(!in_array($x, $keys)) {
       $keys[] = $x;   
    }		
}
$random='';
foreach($keys as $key => $val){
   $random .= $char[$val];  
}
return $random;
}

?>
<img src="<?php echo $base ?>images/<?php echo $text=RandomCode(1); ?>" width="685" height="190">